#!/usr/bin/python
#coding:utf-8
from scapy.all import *

def c(p):
    if p[TCP].payload:
        mp = str(p[TCP].payload)
        if "user" in mp.lower() or "pass" in mp.lower():
            print "[*] Data[TCP].payload=",mp
            print "[*] Connect server: %s" % p[IP].dst
    #print p.show()

sniff(filter="tcp port 80 or tcp port 25", prn=c, count=1)
